quoting library and benchmark names in warning
authorxftroxgpx <xftroxgpx@gmail.com>
Tue, 18 Jul 2017 12:32:18 +0000 (14:32 +0200)
committerxftroxgpx <xftroxgpx@gmail.com>
Tue, 18 Jul 2017 12:33:27 +0000 (14:33 +0200)
src/cargo/util/toml/targets.rs
tests/bench.rs
tests/build.rs

index 9cd5ed5ffff0239d72537dc48226049b5b3b73bf..498bb66370452ded79c7165db8f0f9ab2f49dd1c 100644 (file)
@@ -110,7 +110,7 @@ fn clean_lib(toml_lib: Option<&TomlLibTarget>,
                         .unwrap_or(&legacy_path);
 
                     warnings.push(format!(
-                        "path `{}` was erroneously implicitly accepted for library {},\n\
+                        "path `{}` was erroneously implicitly accepted for library `{}`,\n\
                          please rename the file to `src/lib.rs` or set lib.path in Cargo.toml",
                         short_path.display(), lib.name()
                     ));
@@ -272,7 +272,7 @@ fn clean_benches(toml_benches: Option<&Vec<TomlBenchTarget>>,
                 .unwrap_or(&legacy_path);
 
             warnings.push(format!(
-                "path `{}` was erroneously implicitly accepted for benchmark {},\n\
+                "path `{}` was erroneously implicitly accepted for benchmark `{}`,\n\
                  please set bench.path in Cargo.toml",
                 short_path.display(), bench.name()
             ));
index 2fbbd1f99ade02ba8bc64faf2cfe749e706ab254..094bcb3d7b623250d481f85982c3765da1a55a6c 100644 (file)
@@ -1186,6 +1186,6 @@ fn legacy_bench_name() {
         "#);
 
     assert_that(p.cargo_process("bench"), execs().with_status(0).with_stderr_contains("\
-[WARNING] path `src[/]bench.rs` was erroneously implicitly accepted for benchmark bench,
+[WARNING] path `src[/]bench.rs` was erroneously implicitly accepted for benchmark `bench`,
 please set bench.path in Cargo.toml"));
 }
index c94f5c56be8b90a0b6d2e2a0ea5419d0973859e3..d56c70073ed24f3e35ac9a94a8e943603c87f1e7 100644 (file)
@@ -1047,7 +1047,7 @@ fn many_crate_types_old_style_lib_location() {
             pub fn foo() {}
         "#);
     assert_that(p.cargo_process("build"), execs().with_status(0).with_stderr_contains("\
-[WARNING] path `src[/]foo.rs` was erroneously implicitly accepted for library foo,
+[WARNING] path `src[/]foo.rs` was erroneously implicitly accepted for library `foo`,
 please rename the file to `src/lib.rs` or set lib.path in Cargo.toml"));
 
     assert_that(&p.root().join("target/debug/libfoo.rlib"), existing_file());